<?php
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager();
$citys = DB::LimitQuery('category', array(
	'condition' => array( 'zone' => 'city', 'display' => 'Y', 'id' => $auth_info['city_id'] ),'order' => 'ORDER BY `sort_order` DESC, `id` DESC',
));

$groups = DB::LimitQuery('category', array(
'condition' => array( 'zone' => 'group','fid' => '0', ),
));
$groups = Utility::OptionArray($groups, 'id', 'name');
/* 取得用户的分类 */
$user_group_ids = unserialize($auth_info['group_ids']);
foreach ($groups as $key => $val) {
	if (!in_array($key, $user_group_ids)) {
		unset($groups[$key]);
	}
}
$group_char = implode('，', $groups);

include template('manage_misc_index');